package com.internetCafes.spms.web.customer.service.impl.customer;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.internetCafes.spms.web.customer.entity.customer.CustomerFollow;
import com.internetCafes.spms.web.customer.mapper.customer.CustomerFollowMapper;
import com.internetCafes.spms.web.customer.service.customer.ICustomerFollowService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 客户更进日志表 服务实现类
 * </p>
 *
 * @author Zj
 * @since 2021-10-20
 */
@Service
public class CustomerFollowServiceImpl extends ServiceImpl<CustomerFollowMapper, CustomerFollow> implements ICustomerFollowService {

    @Override
    public List<CustomerFollow> selectLastFollowList(List<Long> customerIdList) {
        return baseMapper.selectLastFollowList(customerIdList);
    }

    @Override
    public boolean removeByCustomerIdList(List<Long> customerIdList) {
        return remove(new LambdaQueryWrapper<CustomerFollow>().in(CustomerFollow::getCustomerId, customerIdList));
    }
}
